package com.sunop.panticlass.mapper;

import com.sunop.panticlass.model.ClassPO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ClassNoiceMapper {

    @Insert("insert into noice (class_id, teacher_id, teacher_name,  content, priority) values " +
            "(#{classId}, #{teacherId}, #{teacherName}, #{content}, #{priority})")
    void insert(ClassPO message) ;

    @Select("select * from noice where class_id = #{classId} order by send_time desc ")
    ClassPO getMessage(int classId);

    void saveProblemIds(int classId, int id, List<Integer> problemIds);

    List<Integer> getOverProblemIds(int massageId);
}
